package com.java.grammer;/*
求13和25的最小公倍数和最大公约数
最小公倍数：最小肯定比25大  定义j变量
最大公约数：最大肯定比13小 定义i变量
打印100以内奇数的和
for  -- 

*/


import java.util.Scanner;

public class ForTest_1 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        System.out.println("请输入第一个数");
        int a = sc.nextInt();
        System.out.println("请输入第二个数");
        int b = sc.nextInt();
        for (int i = a; i >= 1; i--) {
            if (a % i == 0 && b % i == 0) {
                System.out.println("最大公因数是" + i);
                break;
            }
        }
		/*
		for(int j = b;j <= (a*b);j++){
			if( j % a == 0 && j % b == 0){
				System.out.println("最小公倍数是"+j);
				break;
		}

		}

			int sum = 0;
			int count = 0;
			for(int i=1; i<=100;i++ ){
				if(i % 2 !=0){
					System.out.println(i);
					sum += i;
					count++;
				}
				
			}
			System.out.println(sum);
			System.out.println("个数为"+count);	    
			int count = 0;
			int sum = 0;
			for(int i =1;i<=100;i++){
				if(i % 7 == 0){
					System.out.println(i);
					count++;
					sum +=i;
				}
			}
				
				System.out.println("总和为"+sum);
				System.out.println("他们的个数为"+count);
			for(int i =100;i<=999;i++){
				int a = i/100%10;
				int b = i/10%10;
				int c = i%10;
				if(a*a*a+b*b*b+c*c*c==i){
						System.out.println(i);
				}
					
			}

				for(int i =1;i<100;i++){
					if(i%2!=0 && i%3!=0 && i%7 !=0){
						System.out.println(i);
					}
				}

				int i = 1;
				while(i<100){
					if(i%2!=0 && i%3!=0 && i%7!=0){
						System.out.println(i);
						}
						i++;
				}
				
				int j=1;
				do{
					if(j%2!=0 && j%3!=0 && j%7!=0){
						System.out.println(j);
					}
				}while(j<100);

				
				int x = 0;
				int y = 0;
				//while(true){
					for(;;){
					int i = sc.nextInt();
					if(i>0){
						x++;
					}else if(i<0){
						y++;
					}else{
						break;
					}
					System.out.println("正数的个数为"+x);
					System.out.println("负数的个数为"+y);
					}
					
		
					int hang =4;
					for(int j=1;j<=4;j++){
						for(int i = 1; i<=j;i++){
							System.out.print("*");

						}
						System.out.println();	
					}
*/
        for (int i = 1; i <= 4; i++) {
            for (int j = 1; j <= 5 - i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
